package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.request.create.InvoiceApplyCreateDto;
import com.molichuxing.services.infrastructure.dto.response.InvoiceApplyDto;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 发票申请 服务类
 * </p>
 *
 * @author zhaopenghui
 * @since 2019-09-20
 */
public interface InvoiceApplyService extends RootService {

    /**
     * 通过id获取申请信息
     *
     * @param invoiceApplyIdList
     * @return
     * @throws Exception
     */
    public Map<Integer, InvoiceApplyDto> getInvoiceApplyMap(List<Integer> invoiceApplyIdList) throws Exception;


    /**
     * 根据订单或者用户获取发票申请id
     *
     * @param orderCode
     * @param userId
     * @return
     * @throws Exception
     */
    public List<Integer> getInvoiceApplyIds(Long orderCode, Integer userId) throws Exception;

    /**
     * 根据订单或者用户获取发票申请id
     *
     * @param orderCode
     * @param userId
     * @return
     * @throws Exception
     */
    public List<Integer> getInvoiceApplyIds(Long orderCode, Integer userId, Integer invoiceTitleType) throws Exception;

    /**
     * 发票申请
     *
     * @param invoiceApplyCreateDto
     * @return
     * @throws Exception
     */
    public Integer createInvoiceApply(InvoiceApplyCreateDto invoiceApplyCreateDto) throws Exception;

}
